package com.story.domain;

import java.util.Date;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.story.web.utils.DateJsonSerializer;

/*
 * @User 前台用户数据实体
 * */
public class User{
	
	private String uid;
	
	@Pattern(regexp="^[A-Za-z][A-Za-z1-9_-]{5,14}$",message="{user.username.error}")
	private String username;
	
	@Size(max=30,min=6,message="{user.password.error}")
	private String password;
	
	private String salt;
	private Date registeTime;
	private String registeIp;
	private Boolean activeStatus;
	private Boolean AccountStatus;
	/**
	 * @return the uid
	 */
	public String getUid() {
		return uid;
	}
	/**
	 * @param uid the uid to set
	 */
	public void setUid(String uid) {
		this.uid = uid;
	}
	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}
	/**
	 * @param username the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}
	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}
	/**
	 * @param password the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}
	/**
	 * @return the salt
	 */
	public String getSalt() {
		return salt;
	}
	/**
	 * @param salt the salt to set
	 */
	public void setSalt(String salt) {
		this.salt = salt;
	}
	/**
	 * @return the registeTime
	 */
	@JsonSerialize(using=DateJsonSerializer.class)
	public Date getRegisteTime() {
		return registeTime;
	}
	/**
	 * @param registeTime the registeTime to set
	 */
	public void setRegisteTime(Date registeTime) {
		this.registeTime = registeTime;
	}
	/**
	 * @return the registeIp
	 */
	public String getRegisteIp() {
		return registeIp;
	}
	/**
	 * @param registeIp the registeIp to set
	 */
	public void setRegisteIp(String registeIp) {
		this.registeIp = registeIp;
	}
	/**
	 * @return the activeStatus
	 */
	public Boolean getActiveStatus() {
		return activeStatus;
	}
	/**
	 * @param activeStatus the activeStatus to set
	 */
	public void setActiveStatus(Boolean activeStatus) {
		this.activeStatus = activeStatus;
	}
	/**
	 * @return the accountStatus
	 */
	public Boolean getAccountStatus() {
		return AccountStatus;
	}
	/**
	 * @param accountStatus the accountStatus to set
	 */
	public void setAccountStatus(Boolean accountStatus) {
		AccountStatus = accountStatus;
	}

	
	
	
}
